<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../js/js_forward.js"></script>
    <script type="text/javascript">
        /*??*/
        window.onunload = message;
            function message() {
            alert("确定离开吗");
        }

        function clock(){
            var time=new Date();
            document.getElementById("clock").value = time;
        }
        var i = setInterval("clock()",100);
    </script>
</head>
<body>
<form>
    <input type="text" id="clock" size="50"  />
    <input type="button" value="Stop" onclick="clearInterval(i)" />
</form>
</body>
</html>